package luogu;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class P1319 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<Integer> list = new ArrayList<>();
        int sum = 0;
        do {
            int a = sc.nextInt();
            sum += a;
            list.add(a);
        } while (sum != n * n);
        int count = 0;
        for (int i = 0; i < list.size(); i++) {
            if ((i + 1) % 2 == 0) {
                for (Integer integer = 0; integer < list.get(i); integer++) {
                    System.out.print(1);
                    count++;
                    if (count == n) {
                        System.out.println();
                        count = 0;
                    }
                }
            }else {
                for (Integer integer = 0; integer < list.get(i); integer++) {
                    System.out.print(0);
                    count++;
                    if (count == n) {
                        System.out.println();
                        count = 0;
                    }
                }
            }
        }
    }
}
